package net.cyndeline.rldungeon.dgs.strategy.help

import net.cyndeline.rldungeon.dgs.graph.Room
import scala.reflect.ClassTag
import scalax.collection.GraphEdge.UnDiEdge
import scalax.collection.immutable.Graph
import scala.reflect.runtime.universe._

/**
 * Responsible for merging cycles of a graph into super-nodes representing every vertex in the cycle.
 * Cycles that share vertices are merged into the same node.
 */
trait SuperNodeFactoryInterface {

  def collapseCycles[VType <: Room[VType] : ClassTag : TypeTag, EType[X] <: UnDiEdge[X]](graph: Graph[VType, EType]): Graph[CollapsedNode[VType], CollapsedEdge[VType]#Inner]

}
